public class BindErrorsTag extends HtmlEscapingAwareTag
<hasBindErrors>
tag provides an Errors
instance in case of
bind errors. The HTML escaping flag participates in a page-wide or
application-wide setting (i.e. by HtmlEscapeTag or a "defaultHtmlEscape"
context-param in web.xml).
Attribute | Required? | Runtime Expression? | Description |
---|---|---|---|
htmlEscape | false | true | Set HTML escaping for this tag, as boolean value. Overrides the default HTML escaping setting for the current page. |
name | true | true | The name of the bean in the request that needs to be inspected for errors. If errors are available for this bean, they will be bound under the 'errors' key. |
Modifier and Type | Field and Description |
---|---|
private Errors |
errors |
static java.lang.String |
ERRORS_VARIABLE_NAME |
private java.lang.String |
name |
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
Constructor and Description |
---|
BindErrorsTag() |
Modifier and Type | Method and Description |
---|---|
int |
doEndTag() |
void |
doFinally() |
protected int |
doStartTagInternal()
Called by doStartTag to perform the actual work.
|
Errors |
getErrors()
Retrieve the Errors instance that this tag is currently bound to.
|
java.lang.String |
getName()
Return the name of the bean that this tag checks.
|
void |
setName(java.lang.String name)
Set the name of the bean that this tag should check.
|
htmlEscape, isDefaultHtmlEscape, isHtmlEscape, isResponseEncodedHtmlEscape, setHtmlEscape
doCatch, doStartTag, getRequestContext
public static final java.lang.String ERRORS_VARIABLE_NAME
private java.lang.String name
public void setName(java.lang.String name)
public java.lang.String getName()
protected final int doStartTagInternal() throws ServletException, JspException
RequestContextAwareTag
doStartTagInternal
in class RequestContextAwareTag
ServletException
JspException
javax.servlet.jsp.tagext.TagSupport#doStartTag
public int doEndTag()
@Nullable public final Errors getErrors()
Intended for cooperating nesting tags.
public void doFinally()
doFinally
in class RequestContextAwareTag